angular.module("RDash")
    .controller("TPasswordResetCtrl", ["$scope", "$uibModalInstance", "params", function ($scope, $uibModalInstance, params) {
        $scope.username = params.username;
        $scope.password = null;
        $scope.newPassword = null;

        $scope.resetPassword = function () {
            $uibModalInstance.close({
                username: $scope.username,
                password: $scope.password,
                newPassword: $scope.newPassword
            });
        };

        $scope.cancel = function () {
            $uibModalInstance.dismiss("cancel");
        };
    }]);